<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:of="http://omnifaces.org/functions">
    <h:head>
        <link href="resources/css/style.css" rel="stylesheet" type="text/css" />
    </h:head>

    <h:body>
        <h:form>
            <p:panel header="Ops... An internal error ocurred! Please, warn the system develper!" >  
                <h:outputText value="To try again, click " />
                <h:outputLink value="/atividades.xhtml" >HERE</h:outputLink>.

                <ul>
                    <li>Date/time: #{of:formatDate(now, 'yyyy-MM-dd HH:mm:ss')}</li>
                    <li>User agent: #{header['user-agent']}</li>
                    <li>User IP: #{request.remoteAddr}</li>
                    <li>Request URI: <a href="#{requestScope['javax.servlet.error.request_uri']}">#{requestScope['javax.servlet.error.request_uri']}</a></li>
                    <li>Ajax request: #{facesContext.partialViewContext.ajaxRequest ? 'Yes' : 'No'}</li>
                    <li>Status code: #{requestScope['javax.servlet.error.status_code']}</li>
                    <li>Exception type: #{requestScope['javax.servlet.error.exception_type']}</li>
                    <li>Exception message: #{requestScope['javax.servlet.error.message']}</li>
                    <li>Stack trace: <pre><code>#{of:printStackTrace(requestScope['javax.servlet.error.exception'])}</code></pre></li>
                </ul>
            </p:panel>  
        </h:form>
    </h:body>
</html>

